home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3314 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  791 b 

  1. Path: news.uni-c.dk!news
  2. From: Frank Nielsen <frank.nielsen@ntsrv.capacity.dk>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Random numbers in C++
  5. Date: Tue, 23 Jan 1996 10:07:34 -0800
  6. Organization: CapaCity
  7. Message-ID: <310523E6.624C@ntsrv.capacity.dk>
  8. References: <4e07ge$me7@server1.ctc.com>
  9. NNTP-Posting-Host: pc51.capacity.dk
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0b5 (Win95; I; 16bit)
  14.  
  15. Richard Kemp wrote:
  16. > Hi!!
  17. > How do you make a random number in C++. I'm not familiar with C, so if it's a C
  18. > function that will help a lot also. Thanks!!
  19. > --
  20. > Richard Kemp
  21.  
  22.  
  23. Hey Richard.
  24.  
  25. First call "C" function randomize(); at startup.
  26.  
  27. Then every time you need a random number you call random(<max random 
  28. number>).
  29.